package com.qifan.alb2b.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.qifan.alb2b.dao.NewsInfoDao;
import com.qifan.alb2b.domain.NewsInfoDomain;
import com.qifan.alb2b.util.DataGridModel;
import com.qifan.alb2b.util.Page;

@Service
public class NewsInfoService {
	private NewsInfoDao newsInfoDao;

	public void setNewsInfoDao(NewsInfoDao newsInfoDao) {
		this.newsInfoDao = newsInfoDao;
	}
	
	public Page query(DataGridModel dgm,NewsInfoDomain uqp){
		return newsInfoDao.query(dgm,uqp);
	}
	public List<NewsInfoDomain> getNews(String type){
		return newsInfoDao.getNews(type);
	}
	public List<NewsInfoDomain> queryNews(){
		return newsInfoDao.queryNews();
	}
	
	public List<NewsInfoDomain> getCompNews(String id){
		return newsInfoDao.getCompNews(id);
	}
	public List<NewsInfoDomain> getNewsById(String id){
		return newsInfoDao.getNewsById(id);
	}
	public void add(NewsInfoDomain newsInfoDomain){
		newsInfoDao.add(newsInfoDomain);
	}
	
	public void update(NewsInfoDomain newsInfoDomain){
		newsInfoDao.update(newsInfoDomain);
	}
	
	public void delete(String[] ids){
		newsInfoDao.delete(ids);
	}
	public void updateStatus(String[] ids,String status){
		newsInfoDao.updateStatus(ids,status);
	}
}
